package bo.zhao.action.facade.demo2;

import bo.zhao.action.facade.demo2.subs.CPU;
import bo.zhao.action.facade.demo2.subs.Disk;
import bo.zhao.action.facade.demo2.subs.NetCard;

/**
 * 通过 FacadeComputer 类聚合 Disk，CPU，NetCard，使用户和这三个类解耦
 * */
public class FacadeComputer {
	
	private Disk disk=new Disk();
	private CPU cpu=new CPU();
	private NetCard netCard=new NetCard();
	
	
	public void readFile() {
		disk.readFile();
	}

	public void writeFile() {
		disk.writeFile();
	}
	
	public void calc() {
		cpu.calc();
	}
	
	public void send() {
		netCard.send();
	}
	
	public void receive() {
		netCard.receive();
	}
	
}
